<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Structures  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset="utf-8">
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
    <script src="js/lunr.min.js" defer></script>
    <script src="js/typeahead.jquery.js" defer></script>
    <script src="js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Section/Structures" class="dashAnchor"></a>

    <a title="Structures  Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="index.html">
          KituraContracts 1.2.200 Docs
        </a>
         (99% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/Kitura/KituraContracts/">
            <img class="header-icon" src="img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="index.html">KituraContracts Reference</a>
      <img class="carat" src="img/carat.png" />
      Structures  Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/Coder.html">Coder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/QueryDecoder.html">QueryDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Classes/QueryEncoder.html">QueryEncoder</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/IdentifierError.html">IdentifierError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/Operator.html">Operator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/Order.html">Order</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Enums/QueryParamsError.html">QueryParamsError</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Bool.html">Bool</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Double.html">Double</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Float.html">Float</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Int.html">Int</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Int16.html">Int16</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Int32.html">Int32</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Int64.html">Int64</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/Int8.html">Int8</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions.html#/s:10Foundation11JSONDecoderC">JSONDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions.html#/s:10Foundation11JSONEncoderC">JSONEncoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UInt.html">UInt</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UInt16.html">UInt16</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UInt32.html">UInt32</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UInt64.html">UInt64</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UInt8.html">UInt8</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Extensions/UUID.html">UUID</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/BodyDecoder.html">BodyDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/BodyEncoder.html">BodyEncoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Identifier.html">Identifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/Operation.html">Operation</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Protocols/QueryParams.html">QueryParams</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/BodyFormat.html">BodyFormat</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/ExclusiveRange.html">ExclusiveRange</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/GreaterThan.html">GreaterThan</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/GreaterThanOrEqual.html">GreaterThanOrEqual</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/InclusiveRange.html">InclusiveRange</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/LowerThan.html">LowerThan</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/LowerThanOrEqual.html">LowerThanOrEqual</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/Ordering.html">Ordering</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/Pagination.html">Pagination</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/RequestError.html">RequestError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/RequestError/ErrorBody.html">– ErrorBody</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Structs/UnsupportedBodyFormatError.html">UnsupportedBodyFormatError</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts19CodableArrayClosurea">CodableArrayClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts25CodableArrayResultClosurea">CodableArrayResultClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts14CodableClosurea">CodableClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts24CodableIdentifierClosurea">CodableIdentifierClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts20CodableResultClosurea">CodableResultClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts29IdentifierCodableArrayClosurea">IdentifierCodableArrayClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts35IdentifierCodableArrayResultClosurea">IdentifierCodableArrayResultClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts24IdentifierCodableClosurea">IdentifierCodableClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts30IdentifierCodableResultClosurea">IdentifierCodableResultClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts27IdentifierNonCodableClosurea">IdentifierNonCodableClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts30IdentifierSimpleCodableClosurea">IdentifierSimpleCodableClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts17NonCodableClosurea">NonCodableClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts13ResultClosurea">ResultClosure</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="Typealiases.html#/s:15KituraContracts20SimpleCodableClosurea">SimpleCodableClosure</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>Structures</h1>
            <p>The following structures are available globally.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts10BodyFormatV"></a>
                    <a name="//apple_ref/swift/Struct/BodyFormat" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts10BodyFormatV">BodyFormat</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A set of values representing the format of a response body.</p>

<p>This struct is intended to be &ldquo;enum-like&rdquo; and values should be
accessed via the public static stored properties.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    An enum was not used here because currently enums are
    always exhaustive. This means adding a case to an enum
    is a breaking change. In order to keep such additions
    non-breaking we have used an &ldquo;enum-like&rdquo; struct instead.
    This means code using <code>BodyFormat</code> should always handle
    unrecognised <code>BodyFormat</code> values (eg in a default case
    of a switch). <code><a href="Structs/UnsupportedBodyFormatError.html">UnsupportedBodyFormatError</a></code> may be used
    in this situation.

</div>
<h3 id='usage-example' class='heading'>Usage Example:</h3>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">format</span> <span class="o">=</span> <span class="kt">BodyFormat</span><span class="o">.</span><span class="n">json</span>
</code></pre>

                        <a href="Structs/BodyFormat.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">BodyFormat</span> <span class="p">:</span> <span class="kt">Equatable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts26UnsupportedBodyFormatErrorV"></a>
                    <a name="//apple_ref/swift/Struct/UnsupportedBodyFormatError" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts26UnsupportedBodyFormatErrorV">UnsupportedBodyFormatError</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An error that may be thrown when a particular instance of <code><a href="Structs/BodyFormat.html">BodyFormat</a></code>
is not supported.</p>

                        <a href="Structs/UnsupportedBodyFormatError.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">UnsupportedBodyFormatError</span> <span class="p">:</span> <span class="kt">Error</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts12RequestErrorV"></a>
                    <a name="//apple_ref/swift/Struct/RequestError" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts12RequestErrorV">RequestError</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An error representing a failed request.
This definition is intended to be used by both the client side (e.g. KituraKit)
and server side (e.g. Kitura) of the request (typically a HTTP REST request).</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>In this example, the <code>RequestError</code> is used in a Kitura server Codable route handler to
indicate the request has failed because the requested record was not found.</p>
<pre class="highlight swift"><code><span class="n">router</span><span class="o">.</span><span class="nf">get</span><span class="p">(</span><span class="s">"/users"</span><span class="p">)</span> <span class="p">{</span> <span class="p">(</span><span class="nv">id</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">respondWith</span><span class="p">:</span> <span class="p">(</span><span class="kt">User</span><span class="p">?,</span> <span class="kt">RequestError</span><span class="p">?)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)</span> <span class="k">in</span>
    <span class="o">...</span>
    <span class="nf">respondWith</span><span class="p">(</span><span class="kc">nil</span><span class="p">,</span> <span class="kt">RequestError</span><span class="o">.</span><span class="n">notFound</span><span class="p">)</span>
    <span class="o">...</span>
<span class="p">}</span>
</code></pre>

                        <a href="Structs/RequestError.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">RequestError</span> <span class="p">:</span> <span class="kt">RawRepresentable</span><span class="p">,</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span><span class="p">,</span> <span class="kt">Comparable</span><span class="p">,</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">CustomStringConvertible</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts8OrderingV"></a>
                    <a name="//apple_ref/swift/Struct/Ordering" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts8OrderingV">Ordering</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct containing the ordering information</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To order ascending by name and descending by age, we would write:</p>
<pre class="highlight swift"><code>   <span class="kt">Ordering</span><span class="p">(</span><span class="nv">by</span><span class="p">:</span> <span class="o">.</span><span class="nf">asc</span><span class="p">(</span><span class="s">"name"</span><span class="p">),</span> <span class="o">.</span><span class="nf">desc</span><span class="p">(</span><span class="s">"age"</span><span class="p">))</span>
</code></pre>

                        <a href="Structs/Ordering.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Ordering</span> <span class="p">:</span> <span class="kt">Codable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts10PaginationV"></a>
                    <a name="//apple_ref/swift/Struct/Pagination" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts10PaginationV">Pagination</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct containing the pagination information</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To get only the first 10 values, we would write:</p>
<pre class="highlight swift"><code><span class="kt">Pagination</span><span class="p">(</span><span class="nv">size</span><span class="p">:</span> <span class="mi">10</span><span class="p">)</span>
</code></pre>

<p>To get the 11th to 20th values, we would write:</p>
<pre class="highlight swift"><code><span class="kt">Pagination</span><span class="p">(</span><span class="nv">start</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="mi">10</span><span class="p">)</span>
</code></pre>

                        <a href="Structs/Pagination.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Pagination</span> <span class="p">:</span> <span class="kt">Codable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts11GreaterThanV"></a>
                    <a name="//apple_ref/swift/Struct/GreaterThan" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts11GreaterThanV">GreaterThan</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling greater than filtering</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter with greaterThan on age which is an Integer, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">GreaterThan</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">GreaterThan</span><span class="p">(</span><span class="nv">value</span><span class="p">:</span> <span class="mi">8</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span>
</code></pre>

<p>Note: The &ldquo;age=8&rdquo; format is not an API but an implementation detail that could change in the future.</p>

                        <a href="Structs/GreaterThan.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">GreaterThan</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts18GreaterThanOrEqualV"></a>
                    <a name="//apple_ref/swift/Struct/GreaterThanOrEqual" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts18GreaterThanOrEqualV">GreaterThanOrEqual</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling greater than or equal filtering</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter with greater than or equal on age which is an Integer, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">GreaterThanOrEqual</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">GreaterThanOrEqual</span><span class="o">&gt;</span><span class="p">(</span><span class="nv">value</span><span class="p">:</span> <span class="mi">8</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span>
</code></pre>

<p>Note: The &ldquo;age=8&rdquo; format is not an API but an implementation detail that could change in the future.</p>

                        <a href="Structs/GreaterThanOrEqual.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">GreaterThanOrEqual</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts9LowerThanV"></a>
                    <a name="//apple_ref/swift/Struct/LowerThan" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts9LowerThanV">LowerThan</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling lower than filtering</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter with lower than on age, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">LowerThan</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">LowerThan</span><span class="p">(</span><span class="nv">value</span><span class="p">:</span> <span class="mi">8</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span>
</code></pre>

<p>Note: The &ldquo;age=8&rdquo; format is not an API but an implementation detail that could change in the future.</p>
<pre class="highlight swift"><code></code></pre>

                        <a href="Structs/LowerThan.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LowerThan</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts16LowerThanOrEqualV"></a>
                    <a name="//apple_ref/swift/Struct/LowerThanOrEqual" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts16LowerThanOrEqualV">LowerThanOrEqual</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling lower than or equal filtering</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter with lower than or equal on age, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">LowerThanOrEqual</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">LowerThanOrEqual</span><span class="p">(</span><span class="nv">value</span><span class="p">:</span> <span class="mi">8</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span>
</code></pre>

<p>Note: The &ldquo;age=8&rdquo; format is not an API but an implementation detail that could change in the future.</p>

                        <a href="Structs/LowerThanOrEqual.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LowerThanOrEqual</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts14InclusiveRangeV"></a>
                    <a name="//apple_ref/swift/Struct/InclusiveRange" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts14InclusiveRangeV">InclusiveRange</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling to filter with an inclusive range</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter on age using an inclusive range, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">InclusiveRange</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">InclusiveRange</span><span class="p">(</span><span class="nv">start</span><span class="p">:</span> <span class="mi">8</span><span class="p">,</span> <span class="nv">end</span><span class="p">:</span> <span class="mi">14</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span><span class="mi">14</span>
</code></pre>

<p>Note: The &ldquo;age=8,14&rdquo; format is not an API but an implementation detail that could change in the future.</p>

                        <a href="Structs/InclusiveRange.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">InclusiveRange</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:15KituraContracts14ExclusiveRangeV"></a>
                    <a name="//apple_ref/swift/Struct/ExclusiveRange" class="dashAnchor"></a>
                    <a class="token" href="#/s:15KituraContracts14ExclusiveRangeV">ExclusiveRange</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>A codable struct enabling to filter with an exlusive range</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>

<p>To filter on age using an exclusive range, we would write:</p>
<pre class="highlight swift"><code><span class="kd">struct</span> <span class="kt">MyQuery</span><span class="p">:</span> <span class="kt">QueryParams</span> <span class="p">{</span>
  <span class="k">let</span> <span class="nv">age</span><span class="p">:</span> <span class="kt">ExclusiveRange</span><span class="o">&lt;</span><span class="kt">Int</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">query</span> <span class="o">=</span> <span class="kt">MyQuery</span><span class="p">(</span><span class="nv">age</span><span class="p">:</span> <span class="kt">ExclusiveRange</span><span class="p">(</span><span class="nv">start</span><span class="p">:</span> <span class="mi">8</span><span class="p">,</span> <span class="nv">end</span><span class="p">:</span> <span class="mi">14</span><span class="p">))</span>
</code></pre>

<p>In a URL it would translate to:</p>
<pre class="highlight swift"><code><span class="p">?</span><span class="n">age</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span><span class="mi">14</span>
</code></pre>

<p>Note: The &ldquo;age=8,14&rdquo; format is not an API but an implementation detail that could change in the future.</p>

                        <a href="Structs/ExclusiveRange.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">ExclusiveRange</span><span class="o">&lt;</span><span class="kt">I</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Operation.html">Operation</a></span> <span class="k">where</span> <span class="kt">I</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Identifier.html">Identifier</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2020 <a class="link" href="https://github.com/Kitura/KituraContracts" target="_blank" rel="external">IBM and Kitura project authors</a>. All rights reserved. (Last updated: 2020-12-09)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
